#ifndef     __ZIP_H_INCLUDED__
#define     __ZIP_H_INCLUDED__

#include    <cstdint>
#include    <cstdlib>

/**
 * ZIP compress/decompress
 */
namespace ZIP {

    /**
     * ZIP operation status code
     */
    enum Status {
        OK = 0,
		StreamEnd = 1,
		NeedDict = 2,
		Errno = -1,
		StreamError = -2,
		DataError = -3,
		MemError = -4,
		BufError = -5,
		VersionError = -6,
		ParamError = -10000,
    };

    /**
	 * Compress data.
	 *
	 * \param dest Buffer to store compressed data.
	 * \param out_size Real size of compressed data.
	 * \param src Source data.
	 * \param src_size Size of source data in bytes.
	 * \return Compress status. \see ZIP::Status
	 */
	extern int Compress(char * dest, size_t & out_size, const char * src, size_t src_size);

	/**
	 * Uncompress data.
	 *
	 * \param dest Buffer to store uncompressed data.
	 * \param out_size Real size of uncompressed data.
	 * \param src Source data.
	 * \param src_size Size of source data in bytes.
	 * \return Uncompress status. \see ZIP::Status
	 */
	extern int Uncompress(char * dest, size_t & out_size, const char * src, size_t src_size);
};

#endif//!   __ZIP_H_INCLUDED__